package com.bkq.viettravel;

import android.app.Activity;
import android.content.Intent;
import android.location.Location;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class TravelService extends Activity {
	private Button hotelBtn, taxiBtn, restaurantBtn, atmBtn;
	private Button homeBtn, favoriteBtn, planBtn, aboutBtn;
	private Location mLocation = null;
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.travel_services);
        hotelBtn = (Button) findViewById(R.id.travelservice_btn_hotel);
        taxiBtn = (Button)findViewById(R.id.travelservice_btn_taxi);
        restaurantBtn = (Button)findViewById(R.id.travelservice_btn_restaurantr);
        atmBtn = (Button)findViewById(R.id.travelservice_btn_atm);
        
        homeBtn = (Button)findViewById(R.id.travel_services_home);
        favoriteBtn = (Button)findViewById(R.id.travel_services_favourites);
        planBtn = (Button)findViewById(R.id.travel_services_plant);
        aboutBtn = (Button)findViewById(R.id.travel_services_information);
        hotelBtn.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View arg0) {
				Intent i = new Intent(TravelService.this,ListHotel.class);
				Bundle extras = new Bundle();
				extras.putString("lat", "16.072207");
				extras.putString("long", "108.227066");
				i.putExtras(extras);
				startActivity(i);
				
			}
		});
        
        homeBtn.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View arg0) {
				homeBtn.setBackgroundDrawable(getApplicationContext().getResources().getDrawable(R.drawable.icon_trangchinh_selected));
				Intent i = new Intent(TravelService.this,ListHotel.class);
				startActivity(i);
				
			}
		});
        
        favoriteBtn.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				favoriteBtn.setBackgroundDrawable(getApplicationContext().getResources().getDrawable(R.drawable.icon_uuthich_selected));
				Intent i = new Intent(TravelService.this,FavoritesActivity.class);
				startActivity(i);
			}
		});
        
        planBtn.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				planBtn.setBackgroundDrawable(getApplicationContext().getResources().getDrawable(R.drawable.icon_kehoach_selected));
				Intent i = new  Intent(TravelService.this,Plan.class);
				startActivity(i);
				
			}
		});
        
        aboutBtn.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				aboutBtn.setBackgroundDrawable(getApplicationContext().getResources().getDrawable(R.drawable.icon_thongtin_selected));
				Intent i = new Intent(TravelService.this,About.class);
				
			}
		});
    }
}